Repository navigation
Core: Check only snapshots an attempt added when detecting a landed commit - #4447
Open
Anurag-S1ngh wants to merge 1 commit into
Open
Anurag-S1ngh wants to merge 1 commit into
Anurag-S1ngh wants to merge 1 commit into
Conversation
…ommit A transaction can register a producer that stages no snapshot, such as a delete that matches no files during an overwrite. The landed-attempt check required a snapshot for every producer, so it never detected a commit that landed and was reported as failed. The retry then raised a validation error and deleted the manifests of the snapshot that had already landed. Check the snapshots the attempt actually added instead.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
A transaction can register a producer that stages no snapshot, for example the delete half of an overwrite on an empty table.
_attempt_landed()required a snapshot for every producer, so a commit that landed and was reported as failed was never detected. The retry then raised a validation error and deleted the manifest list and manifests of the snapshot that had already landed, leaving the table unreadable.Check the snapshot ids in the transaction's
AddSnapshotUpdates instead. Those are the snapshots the attempt actually tried to add.Are these changes tested?
Yes. Two cases in
tests/table/test_commit_retry.pysimulate a lost response for an overwrite on an empty table, with the default retry budget and with zero retries. Both fail before the change and pass after it.tests/tablepasses.Are there any user-facing changes?
No.